package com.zhentao.day05.pm;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class ReaderTest {
  public static void main(String[] args) throws IOException {

    File file = new File("./china.txt");
    // 以 16 为一个单元, 两个字节就可以存储一个汉字。所以此时, 可以正常读取汉字。
    FileReader fr = new FileReader(file);

    char c1 = (char) fr.read();
    char c2 = (char) fr.read();
    char c3 = (char) fr.read();

    System.out.println("c1 = " + c1);
    System.out.println("c2 = " + c2);
    System.out.println("c3 = " + c3);
    fr.close();

  }
}
